/* **********************************************************
 * Copyright 2010 Dimitar Vangelovski
 *
 * This file is part of the Gens3 3D Engine.
 * 
 * The Gens3 3D Engine is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 * 
 * The Gens3 3D Engine is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with the Gens3 3D Engine; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA
 * **********************************************************/


#pragma once

#include "ColorRGB.h"
#include <string>

class CMapDiffuse;

class CSubMaterial
{
public:

	CSubMaterial();
	CSubMaterial(const CSubMaterial &other);
	CSubMaterial(std::string strMatName, float fMatTrans, CMapDiffuse * pMapDif, float fMatShine, float fMatShStrength, float fMatSelfIllum, CColorRGB matAmbient, CColorRGB matDiffuse, CColorRGB matSpecular);
	~CSubMaterial();

	void		SetMapDiffuse(CMapDiffuse * pMapDif) { m_pMapDiffuse = pMapDif; }
	void		SetMaterialName(std::string strName) { m_strMaterialName = strName; }
	void		SetMaterialTransparency(float fMatTrans) { m_fMaterialTransparency = fMatTrans; }
	void		SetMaterialShine(float fMatShine) { m_fMaterialShine = fMatShine; }
	void		SetMaterialShineStrength(float fMatShStrength) { m_fMaterialShineStrength = fMatShStrength; }
	void		SetMaterialSelfIllum(float fMatSelfIllum) { m_fMaterialSelfIllum = fMatSelfIllum; }
	void		SetMaterialAmbient(CColorRGB matAmbient) { m_MaterialAmbient = matAmbient; }
	void		SetMaterialDiffuse(CColorRGB matDiffuse) { m_MaterialDiffuse = matDiffuse; }
	void		SetMaterialSpecular(CColorRGB matSpecular) { m_MaterialSpecular = matSpecular; }
	void		SetSubMaterialIndex(int iIndex) { m_nSubMatIndex = iIndex; }

	CMapDiffuse *	GetMapDiffuse() const { return m_pMapDiffuse; }
	std::string	GetMaterialName() const { return m_strMaterialName; }
	float		GetMaterialTransparency() const { return m_fMaterialTransparency; }
	float		GetMaterialShine() const { return m_fMaterialShine; }
	float		GetMaterialShineStrength() const { return m_fMaterialShineStrength; }
	float		GetMaterialSelfIllum() const { return m_fMaterialSelfIllum; }
	CColorRGB	GetMaterialAmbient() const { return m_MaterialAmbient; }
	CColorRGB	GetMaterialDiffuse() const { return m_MaterialDiffuse; }
	CColorRGB	GetMaterialSpecular() const { return m_MaterialSpecular; }
	int         GetSubMaterialIndex() const { return m_nSubMatIndex; }

private:
	CMapDiffuse *	m_pMapDiffuse;
	std::string	m_strMaterialName;
	float		m_fMaterialTransparency;
	float		m_fMaterialShine;
	float		m_fMaterialShineStrength;
	float		m_fMaterialSelfIllum;
	CColorRGB	m_MaterialAmbient;
	CColorRGB	m_MaterialDiffuse;
	CColorRGB	m_MaterialSpecular;
	int         m_nSubMatIndex;
};
